<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="cache" uri="oscache"%>
<%@ taglib prefix="tuyou" uri="cache"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
  	<cache:cache>
	  	<cache:addgroups groups="yangrui,tuyou"></cache:addgroups>
  	</cache:cache>
  
	没有缓存的时间：<%=new Date().getTime() %><br/>
	
	<cache:cache time="0">
	每5秒刷新一次的日期：<%=new Date().getTime() %><br />
	</cache:cache>
	
	<cache:cache key="1" scope="session">
	手动刷新缓存的日期：<%=new Date().getTime() %><br/>
	</cache:cache>
	<cache:cache key="2" scope="session">
		手动刷新缓存的日期：<%=new Date().getTime() %><br/>
	</cache:cache>
	
	<%-- <cache:flush></cache:flush> --%>
	<a href="flush.jsp">手动刷新</a>
	
	<tuyou:mycache key="tuyou" time="30">
		手动刷新缓存的日期：<%=new Date().getTime() %><br/>
	</tuyou:mycache>
  </body>
</html>
